package servers

import game.Player;

class DbServer {
	
	static DbServer db = new DbServer()	
	private DbServer() {}
	
	Map players = [:] 
	
	static void start() {
		new File("data/gamedb/players.csv").text.splitEachLine(';') {fields ->
			String id = fields[0]
			String firstName = fields[1]
			String name = fields[2]
			db.players += [ id:(new Player(id, firstName, name)) ]
		}
	}

}

